# Contributor: Matthias Ahouansou <matthias@ahouansou.cz>
# Maintainer: Matthias Ahouansou <matthias@ahouansou.cz>
pkgname=mcman
pkgver=0.4.4
pkgrel=0
pkgdesc="Powerful Minecraft Server Manager CLI"
url="https://github.com/ParadigmMC/mcman"
arch="all"
license="GPL-3.0-only"
makedepends="
	cargo
	cargo-auditable
"
subpackages="$pkgname-doc"
source="
	$pkgname-$pkgver.tar.gz::https://github.com/ParadigmMC/mcman/archive/refs/tags/$pkgver.tar.gz
"
options="!check" # no tests

prepare() {
	default_prepare
	cargo fetch --target="$CTARGET" --locked
}

build() {
	cargo auditable build --release --frozen
}

package() {
	install -Dm 755 target/release/mcman "$pkgdir"/usr/bin/mcman

	install -Dm 644 LICENSE "$pkgdir"/usr/share/licenses/"$pkgname"/LICENSE
}

sha512sums="
6b5ca9ba901d803c07932eaab38876bfe7baea767bd747692ba63de2a79924502d60fed4637578ca46cb43f3c16911e4981c85f9393c3fa0888fa5baf9ff54d5  mcman-0.4.4.tar.gz
"
